package page6;

import java.util.Scanner;

import org.junit.Test;

public class Ques1629 {
	
	int sum1 = 1;
	int sum2 = 1;
	int sum;
	int m = 0;
	
	
	public void go(){
		Scanner scan = new Scanner(System.in);
		int n;
		while(scan.hasNext()){
			n = scan.nextInt();
			if(n % 12 == 0){
				System.out.println("YES");
			}else if(n % 3 == 0){
				System.out.println(3);
			}else if(n % 4 == 0){
				System.out.println(4);
			}else{
				System.out.println("NO");
			}
		}
	}
	
	public static void main(String[] args) {
		new Ques1629().go();
	}
}
